<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <title>KAKA</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script type="text/javascript" src='/public/js/main/main.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body style="background-color: #f4f4f4">
 
<link href="/public/css/main.css" rel="stylesheet">
<script type="text/javascript">
    $(document).ready(function () {
        $('._header').width($('.container').width());
    })
</script>
<div class="container" style="background-color: white">
    <div class='_main'>
        <div class="banner">
           <!--  <div class='_logo'>
                <a href='/'><img src="/public/images/kaka.png" class='logo_img'  alt='banner'/></a>
            </div> -->
            <a href='/'><img src="/public/images/banner.png" class='banner_img'  alt='banner'/></a>
        </div>
        <div class='_header'>
            <div style='padding-right: 5rem;padding-top:1px' id="welcome">
                <span class=''><a class='_a' href="/home/passport/login"><img src="/public/images/login.png" width='90px' ></a></span>
                <span class='_span'></span>
                <span class='_span'><a class='_a' href="/home/passport/apply"><img src="/public/images/apply.png" width='90px' ></a></span>
            </div>
            <div style='display:none;color:white' id="already_login">
                <span class='as'><a class='_a color1' href="javascript:void(0);"><b id="login_name"></b><?php if( $msg_num != 0 ){ ?> <a href="/home/message/message"><span class="_message"><?php echo $msg_num; ?></span></a> <?php }?></a> </span>
                <span class='_span as'><b>|</b></span>
                <span class='_span' style="width:7rem"><a class='_a color1' href="/home/passport/repassword"><b>修改密码</b></a></span>
                <span class='_span as'><b>|</b></span>
                <span class='_span'><a class='_a color1' href="/home/passport/logout"><b>退出</b></a></span>
            </div>
        </div>
        <div class="_menu" id='_menu'>
            <div class='_menu_in'>
                <!-- <span class='_menu_b'>
                    <a class='wa' href="/home/company">公司</a>
                </span> -->
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/store')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/store')){?>_a<?php }else{?>wa<?php }?>" href='/home/store'>店铺</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'home/barber')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/barber')){?>_a<?php }else{?>wa<?php }?>" href='/home/barber'>成员</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/action')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/action')){?>_a<?php }else{?>wa<?php }?>" href='/home/action'>活动</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/order')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/order')){?>_a<?php }else{?>wa<?php }?>" href='/home/order'>订单</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/coupon')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/coupon')){?>_a<?php }else{?>wa<?php }?>" href='/home/coupon'>优惠劵</a>
                </span>
                <span class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/goods')){?>_menu_b_2<?php }else{?>_menu_b<?php }?>">
                    <a class="<?php if(strstr(strtolower($_SERVER['REQUEST_URI']),'/home/goods')){?>_a<?php }else{?>wa<?php }?>" href='/home/goods'>商品</a>
                </span>
            </div>
        </div>
        <div class='_line'></div>
 
<div class="_contro">
<?php if($item['status']==1){ ?>
	<a href="/home/goods/" class="_a"><font class="_font">返回</font></a>
<?php }else{?>	
    <a href="javascript:;" onclick='release(<?php echo $item['id'];?>,<?php echo $item['store_id']; ?>)' class="_a"><font class="_font maskLayer">上架</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<a href="/home/goods/create?id=<?php echo $item['id'];?>&store_id=<?php echo $item['store_id']; ?>" class="_a"><font class="_font">返回</font></a>
<?php }?>
</div>
<div class='_cut'></div>
    <div class="preview_div">
    	     <div class='box'>              
                <img src="<?php echo "http://".IMAGE_DOMAIN.$item['images'][0]['image']; ?>" style='width:200px;height:200px;float:left;' >
                <?php if($item['images'][1]['image']!=''){ ?>
                <img src="<?php echo "http://".IMAGE_DOMAIN.$item['images'][1]['image']; ?>" style='width:200px;height:200px;' >
                <?php } ?>
                <br/>
                <div style='clear:both;' ></div>
            </div>
            <div class='_cut2'></div> 
      		<div class='box'>
      			<?php $type = $item['type']; if($type==0){ $mark='lf.png';}elseif($type==1){ $mark='tr.png';}elseif($type==2){ $mark='hl.png';}elseif($type==3){ $mark='yq.png';}elseif($type==4){ $mark='rg.png';}?>
                        <img class='_img' src="/public/images/<?php echo $mark; ?>" style='width:25%;'/>&nbsp;                
               <span style='font-size:2.5rem' ><?php echo $item['name'] ;?></span> 
            </div>
            <div class='box' style='margin-left:11rem;' >
            	<span class='colors-size'>——<?php echo $item['title'];?></span>
            </div> 
      		<div class='box'>
      			包含:<br>
      			<?php if($item['is_meal_set']==0){ ?>
    			<span style='font-size:1.7rem;margin-left:2.5rem;' ><?php echo $item['name'];?></span>
    			<?php }else{ ?>
    			<?php foreach ($item['items'] as $k => $v) { ?>
    			<span style='font-size:1.7rem;margin-left:2.5rem;' ><?php echo $v['name'];?>—<span style='color:red' ><?php echo $v['number'];?></span>次</span> <br/>
    			<?php } ?>
    			<?php } ?>
            </div> 
            <div class='box'  >价格：￥<span style='color:red;font-size:2rem;' ><?php echo ($item['price']/100); ?></span></div>
            <div class='box'>购买数量:&nbsp;&nbsp;&nbsp;<input id="btn1" type="button" value="+" />&nbsp;<input type="text" value="1" style='width:3rem' />&nbsp;<input type="button" id="btn2" value="-" />
			</div>
			<?php $level = json_decode($item['level'],true); if($level==0){ ?>
			<div class='box' style='margin-top:1rem' >适用范围:<span style='font-size:1.7rem;' >所有</span> </div>
			<?php }else{ ?>
				<div class='box' style='margin-top:1rem' >适用范围:
				<?php foreach($level as $v){ ?>
				<?php if($v==1){ $v= '高级发型师';}elseif($v==2){ $v= '高级总监';}elseif($v==3){ $v= '高级顾问';}elseif($v==4){ $v= '高级美容师';}elseif($v==5){ $v= '高级经理';}elseif($v==6){ $v='高级助理';} ?>
				<span style='font-size:1.7rem;'><?php echo $v ?> / </span> 
				<?php  } } ?>
				<div class='box' style='font-size:1.7rem;' ><?php echo $item['intro'] ?> </div>

			</div>
			
<script type="text/javascript">
	function release(item_id,store_id){
            var re = confirm('确定要上架该商品？');
		if(re){
			window.location.href = '/home/goods/release?id='+item_id+'&store_id='+store_id;
		}else{
                    maskLayerClose();
                }
	}
</script>

</div>
<div class="_line"></div>
<div class="_footer">
    ©2015-<?php echo date('Y');?> All Rights Reserved ( 京ICP备15010043号 )
</div>
</div>
<div id='mask_layer' style="text-align: center;width:100%;height:100%;overflow:hidden;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8E8E8E',endColorstr='##8E8E8E');
    background-color:rgba(255, 255, 255, 0.4);position:fixed; _position:absolute; top:0;left:0; z-index:5000;display:none ">
    <div style="padding-top: 20%"><h1><b>loading<span id="_loading"></span></b></h1></div>
</div>
    </body>
</html>